home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3869 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: news.chattanooga.net!usenet
  2. From: "Eric W. Bradway" <ebradway@microsports.com>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: The size of a file
  5. Date: Tue, 30 Jan 1996 18:52:02 -0500
  6. Organization: Micro Sports, Inc.
  7. Message-ID: <310EAF22.1F95@microsports.com>
  8. References: <4ebc03$4gv@gate.compart.fi> <59.28250.5782@windmill.com> <4elf3v$s5o@noc.tor.hookup.net>
  9. NNTP-Posting-Host: 205.244.28.38
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0b5 (Win95; I)
  14.  
  15. Richard Steadman wrote:
  16. > charlie.brown@windmill.com (Charlie Brown) wrote:
  17. > >F>This is driving me nuts.  I can't find a simple way to get the size of a
  18. > > >disk file.  This must be possible using the standard C library, but I
  19. > > >haven't figured out how!
  20.  
  21. > But there's no way to get the file size if its length is greater
  22. > than will fit in a long int?
  23.  
  24. Now you're treading into OS-specific grounds. Assuming you are using an 
  25. OS that allows > 2gig files (or >2gig partitions) then you aren't using 
  26. DOS (or at least, not DOS 7.0/Win95). If you are using Win95/NT then 
  27. there is a specific API call to get file size, disk space 
  28. avail/used/total that handle the big files. If you are using DOS 7.0 
  29. then there are some extensions to the DOS int21 API that provide this 
  30. info. 
  31.  
  32. I'm not experienced enough in UNIX to give advice there....
  33.  
  34. -Eric
  35.